#!/bin/bash
#readonly old_repo=
readonly new_repo=local.harbor.com/library

for image in $(docker images --format '{{.Repository}}:{{.Tag}}'); do
	name=${image##*/}
	new_img=${new_repo}/${name}
	echo "Processing ${image} -> ${new_img}"
	docker tag ${image} ${new_img}
	docker push ${new_img}
done
